#!/usr/bin/perl
use warnings;
use strict;
require 'appointment.pl';
my $flag = shift @ARGV;
#cancel reservation
if ($flag eq "-c"){
	my ($doctor, $user, $date, $time) = @ARGV;
	cancel_doctor($doctor, $user, $date, $time);
	alog("Reservation with $doctor canceled.");
}
#make reservation with a doctor
elsif ($flag eq "-rd"){
	my ($doctor, $user, $date, $time) = @ARGV;
	appointment_doctor($doctor, $user, $date, $time);
}
#make reservation for a certain type
elsif ($flag eq "-rt"){
	my ($type, $user, $date, $time) = @ARGV;
	appointment_type($type, $user, $date, $time);
}
